import React from 'react'
import { useParams } from 'react-router-dom'
import logoImg from '../../assets/images/images/Index/logo.png'
import textImg from '../../assets/images/images/Tests/test-4.png'
import { Breadcrumb } from 'antd';
import { useEffect } from 'react';
import api from '../../apis/examination.js'
import { useState } from 'react';
import { useNavigate } from 'react-router-dom'
const Examination = () => {
    const params = useParams()
    const navigate = useNavigate()
    console.log(params._id, 'sss');
    const [test, setTest] = useState([])
    const [tests, setTests] = useState([])
    useEffect(() => {
        api.getTestsBy({ typeId: params._id }).then(res => {
            console.log(res);
            if (res.data.code == 1) {
                setTest(res.data.data)
            }
        })
    }, [])
    useEffect(() => {
        api.getTestedsByStuId({ typeId: params._id }).then(res => {
            console.log(res.data.data);
            if (res.data.code == 1) {
                setTests([...res.data.data])
            }
        })
    }, [])

    const num = 1;
    function page(_id) {
        navigate(`/start/${_id}`)
    }
    return (

        <div style={{ background: '#f5f7fa' }}>
            
        </div>


    )
}

export default Examination